<?php
include "general_include.php";
//$cms_id = 3;
include "top.php";
include "left.php";



//print_r($_REQUEST);

$SelectSubjectSql="SELECT subject_name,subject_name FROM ".TABLEPREFIX."_contact_subject";
$SubjectSql = $UserManagerObjAjax->HtmlOptionArrayCreate($SelectSubjectSql);


		 
//$RsTutorSql = $UserManagerObjAjax->GetRecords("All",$SelectTutorSql);

//$smarty->assign('SubjectArr',$SubjectArr);
/*if(!empty($_REQUEST['name']) && !empty($_REQUEST['email_l']) && !empty($_REQUEST['subject_id']) && !empty($_REQUEST['msg']))
{

if(isset($_POST['submit']))
{

$cont_name				= $_REQUEST['name'];
echo $cont_name;
$cont_email				= $_REQUEST['email_l'];
echo $cont_email;
$cont_subject_id        = $_REQUEST['subject_id'];
echo $cont_subject_id;
//$cont_subject_name		=$_REQUEST['subject_name'];
//echo $cont_subject_name;
$cont_msg               = $_REQUEST['msg'];


	$to = "qateam2@netneighbours.com";
    $tpl_file="email_templates/register_mail.html";
        $tpl_handler=fopen($tpl_file,"r");
        $tpl_message=fread($tpl_handler,filesize($tpl_file));
        fclose($tpl_handler);
      
            $fromEmail = "NOOBSKOOL Admin";
            $to = $email;
      
            $message = "
			Name :".$cont_name."<br />
            Email : ".$cont_email."<br /> 
			Subject : ".$cont_subject_name." <br />
			Message :".$cont_msg
			;
			
			
			
          $url=$site_url;
          $tpl_message=str_replace("[SITEURL]",$url,$tpl_message);
          $tpl_message=str_replace("[HEADING]",'ADMINISTRATOR',$tpl_message);
          $tpl_message=str_replace("[MESSAGE]",$message,$tpl_message);
$mail = new PHPMailer;
          $mail->FromName = "NOOBSKOOL Admin";
          $mail->From = $cont_email;
          $mail->Subject = $cont_subject_name;
          $mail->Body = stripslashes($tpl_message);
          $mail->IsHTML(true);
          $mail->AddAddress($to,$to);
          //echo $mail->Body;
           if($_SERVER['HTTP_HOST'] !='10.10.0.100')
            $mail->Send();
			
		 echo $mail->Body;
		 exit;
			

}
}
*/

			
$smarty->assign('SubjectSql',$SubjectSql);
$smarty->display('contactus.tpl');
			
//echo "Mail Send.";
include "footer.php";
?>